f4cff7c56b912b030aed6f372bbb73221f218b3e,tests/frontend/org/voltdb/regressionsuites/TestStatisticsSuite.java,TestStatisticsSuite,testTableStatistics,#,300
Before Change
// Validate that each site returns a result for each table
validateRowSeenAtAllSites(results[0], "TABLE_NAME", "WAREHOUSE", true);
validateRowSeenAtAllSites(results[0], "TABLE_NAME", "NEW_ORDER", true);
validateRowSeenAtAllSites(results[0], "TABLE_NAME", "ITEM", true);
}
public void testIndexStatistics() throws Exception {
After Change
VoltTable expectedTable = new VoltTable(expectedSchema);
VoltTable[] results = null;
boolean success = false;
long start = System.currentTimeMillis();
while (!success) {
if (System.currentTimeMillis() - start > 60000) fail("Took too long");
success = true;
// table
//
results = client.callProcedure("@Statistics", "table", 0).getResults();
System.out.println("Test statistics table: " + results[0].toString());
// one aggregate table returned
assertEquals(1, results.length);
validateSchema(results[0], expectedTable);
// with 10 rows per site. Can be two values depending on the test scenario of cluster vs. local.
if (HOSTS * SITES * 3 != results[0].getRowCount()) {
success = false;
}
// Validate that each site returns a result for each table
if (success) {
success = validateRowSeenAtAllSites(results[0], "TABLE_NAME", "WAREHOUSE", true);
}
if (success) {
success = validateRowSeenAtAllSites(results[0], "TABLE_NAME", "NEW_ORDER", true);
}
if (success) {
validateRowSeenAtAllSites(results[0], "TABLE_NAME", "ITEM", true);
}
if (success) break;
}